package com.dyz.wsw.domain.sys.controller;

import com.dyz.wsw.common.web.JsonResult;
import com.dyz.wsw.config.WswProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * 提供一些系统接口服务
 * @author dyz
 * @date 2025/1/13 21:56
 */
@RestController
@RequestMapping("/sys/api")
public class SysApiController {

    @Autowired
    private WswProperties wswProperties;

    @GetMapping("/pub-key")
    public Mono<JsonResult> getPublicKey(){
        return Mono.just(JsonResult.ok(wswProperties.getPublicKey()));
    }
}
